package view {
  import control.gesture.GenerateRandomNumberGesture;

  import flash.events.Event;
  import flash.events.EventDispatcher;

  public class BodyMediator extends EventDispatcher {
    private var _label: String;
    private var _body: Body;

    public function BodyMediator()
    {
    }

    [Bindable(event="labelChange")]
    public function get label(): String {
      return _label;
    }

    public function set body(theBody: Body): void {
      _body = theBody;
    }

    public function generateRandomNumber(event: GenerateRandomNumberGesture): void {
      _label = "Random number: " + Math.random();
      this.dispatchEvent(new Event("labelChange"));
    }
  }
}